package com.cq.androidtools.recycleview.table

import android.content.Context
import android.graphics.Rect
import android.view.View
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView

/**
 * 作者: CQ
 * 日期: 2021-08-10
 * 说明:
 */
class GridLayoutManagerU(context: Context?, spanCount: Int) : GridLayoutManager(context, spanCount) {
    override fun requestChildRectangleOnScreen(parent: RecyclerView, child: View, rect: Rect, immediate: Boolean, focusedChildVisible: Boolean): Boolean {
        return false
    }

//    override fun collectInitialPrefetchPositions(adapterItemCount: Int, layoutPrefetchRegistry: LayoutPrefetchRegistry?) {
//        super.collectInitialPrefetchPositions(1000, layoutPrefetchRegistry)
//    }

//    override fun getExtraLayoutSpace(state: RecyclerView.State?): Int {
//        return 1000
//    }
//
//    override fun setInitialPrefetchItemCount(itemCount: Int) {
//        super.setInitialPrefetchItemCount(itemCount)
//    }

//    override fun getInitialPrefetchItemCount(): Int {
//        return 300
//    }

}